package cn.itcast.bos.dao.base;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Courier;

public interface CourierDao extends JpaRepository<Courier, Integer>,JpaSpecificationExecutor<Courier>{
		
	@Override
	<S extends Courier> S save(S entity);
	
	@Override
	Page<Courier> findAll(Specification<Courier> spec, Pageable pageable);
	@Query(value="update Courier set deltag=?2 where id=?1",nativeQuery=false)
	@Modifying
	void delById(Integer id, Character deltag);
}
